<template>
    <view class="proBox" @tap="toDetail">
        <u--image :src="item.image" width="335rpx" height="335rpx" mode="aspectFill"/>
        <view class="title">
            {{item.storeName}}
        </view>
        <view class="price">
            <text class="unit">¥</text>
            <text class="money">{{item.price}}</text>
        </view>
    </view>
</template>

<script>
    export default {
        name:"product-col",
        props: {
            item: Object
        },
        data() {
            return {
                
            };
        },
        created() {
            console.log(this.item)
        },
        methods: {
            toDetail() {
            	// 跳转详情页
            	uni.navigateTo({
            	    url: '/pages/productDetail/productDetail?productData=' + JSON.stringify(this.item)
            	})
            }
        }
    }
</script>

<style lang="scss" scoped>
    .proBox {
        width: 335rpx;
        background-color: $uni-bg-color;
        border-radius: 8rpx;
        .title {
            padding: 20rpx;
            font-family: PingFang SC, PingFang SC;
            font-size: 30rpx;
            color: #000000;
            line-height: 45rpx;
        }
        .price {
            padding: 0 20rpx 20rpx;
            font-family: DIN Alternate, DIN Alternate;
            font-weight: bold;
            color: #F23D4F;
            line-height: 45rpx;
            .unit {
                font-size: 24rpx;
            }
            .money {
                font-size: 36rpx;
            }
        }
    }
</style>